import request from '@/utils/request.js'


/** 登陆
 * @param { string } mobile 手机号
*/
export function LoginAPI(data) {
	const params = {
	    ...data,
	    clientId: data.clientId || "e5cd7e4891bf95d1d19206ce24a7b32e",
	    grantType: data.grantType || 'password'
	};
	return request({
		url: '/auth/login',
		headers: {
		  isToken: false,
		  isEncrypt: "true"
		},
		method: 'post',
		data: params
	});
}

/**
 * 获取验证码
 */
export function getCodeImgAPI() {
  return request({
    url: '/auth/code',
    headers: {
      isToken: false
    },
    method: 'get',
    timeout: 5000
  });
}

/**
 * 获取用户信息
 */
export function getUserInfoAPI() {
  return request({
    url: '/system/user/getInfo',
    method: 'get'
  });
}